package tests;

import static org.junit.Assert.*;

import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;

public class StarTest {

	private static fallingGame.Star s;

	@BeforeClass
	public static void setUpBeforeClass() throws Exception {
		s = new fallingGame.Star();
	}

	@AfterClass
	public static void tearDownAfterClass() throws Exception {
		s = null;
	}

	@Test
	public final void testSpawn() {
		s.setHeight(100);
		s.spawn();
		assertEquals(-100, s.getY(), 0);
		assertEquals(1.0f, s.getY_vel(), 0);
		assertEquals(392, s.getX(), 0);
		assertEquals(0, s.getX_vel(), 1);
	}

}
